package ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.generateRFCPanel.generateRFCSubs.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JLabel;

import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.controller.generateRFC.SaveRFCThread;
import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.generateRFCPanel.GenerateRFCPanel;

public class SaveRFCButtonListener implements ActionListener
{
	private SaveRFCThread saveRFCThread;
	private GenerateRFCPanel generateRFCPanel;
	private JLabel progress;
	
	public SaveRFCButtonListener(GenerateRFCPanel generateRFCPanel, JLabel progress)
	{
		this.generateRFCPanel =  generateRFCPanel;
		this.progress = progress;
	}
	
	public void actionPerformed(ActionEvent arg0)
	{
		this.saveRFCThread = new SaveRFCThread(generateRFCPanel, progress);
		this.progress.setVisible(true);
		this.saveRFCThread.start();
	}
}